package org.geeks.domain;

import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.OneToMany;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;

/**
 * User类
 * 
 * @author Geek4J
 *
 */
@Accessors(chain = true)
@ToString(callSuper = true)
@Entity
@Setter
@Getter
public class User extends Base {

	private static final long serialVersionUID = 1546277117624496322L;

	/**
	 * 用户名
	 */
	private String username;

	/**
	 * 年龄
	 */
	private Integer age;

	/**
	 * 个人简介
	 */
	@Column(length = 1200)
	private String resume;

	/**
	 * 关联地址
	 */
	@OneToMany(mappedBy = "user", cascade = CascadeType.ALL)
	private List<Address> addresses;
}
